package com.jiawa.wiki.service;

import com.jiawa.wiki.domain.Test;
import com.jiawa.wiki.mapper.TestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Service注解
 * 创建TestService对象存入IOC容器
 */
@Service
public class TestService {

    /**
     * @Autowired 自动装配
     * 根据【类型】在IOC容器寻找TestMapper对象并注入
     */
    @Autowired
    private TestMapper testMapper;

    public List<Test> list(){
        return testMapper.list();
    }
}
